<?php
/*
 * MiniMe - a minimalistic OStatus complient microblogging tool
 * Copyright (C) 2010, Tuomas Koski - koski.tuomas@gmail.com
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * @author     Tuomas Koski <koski.tuomas@gmail.com>
 * @copyright  Tuomas Koski
 * @license    http://www.gnu.org/licenses/lgpl.txt
 */
class Mm_Atom_Element_Link extends Mm_Xml_Element_Abstract {
    
    const TAGNAME = "link";
    
    //http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.link
    // Mandatory elements
    const ATTRIBUTE_REL  = "rel";
    const ATTRIBUTE_HREF = "href";
    protected $mandatoryAttributes = array(self::ATTRIBUTE_REL, 
                                           self::ATTRIBUTE_HREF);
    
    // Non mandatory
    const ATTRIBUTE_TYPE         = "type";
    const ATTRIBUTE_TITLE        = "title";
    const ATTRIBUTE_MEDIA_WIDTH  = "media:width";
    const ATTRIBUTE_MEDIA_HEIGHT = "media:height";
    protected $optionalAttributes = array(self::ATTRIBUTE_TYPE, 
                                          self::ATTRIBUTE_TITLE,
                                          self::ATTRIBUTE_MEDIA_HEIGHT,
                                          self::ATTRIBUTE_MEDIA_WIDTH);
    
    public function __construct($value, $attr) {
        parent::__construct(self::TAGNAME, $value, $attr);
    }
    
    
}